@extends('layouts.header')
@inject('sender','App\Http\Controllers\WroteitController')
@section('content')
    <h2 style="text-align: center;">Inbox</h2>
    <h5 style="text-align: center;">From: {{$sender::getSender($message)->name}} to {{$sender::getReceiver($message)->name}} at {{$message->created_at}}</h5>
    <ul>
        <h2 style="text-align: left; color:darkolivegreen;">{{$message->title}}</h2>
    </ul>
    <h4 style="text-align: left;">{{$message->body}}</h4>    
    <form action="{{ route('new_message') }}" method="GET" style="text-align: center;">
        <button type="submit">Reply</button>
    </form>  
@endsection()